<template>
  <div>
    <p ref="pp">{{ msg }}</p>
    <button @click="change">gai</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      msg: "你好世界",
    };
  },

  methods: {
    change() {
      this.msg = "helloworld";
      // console.log(this.$refs.pp.innerHTML);
      this.$nextTick(() => {
        console.log(this.$refs.pp.innerHTML);
      });
    },
  },
};
</script>

<style lang="scss" scoped>
</style>